{extend name="layout" /}
{block name="title"}角色管理{/block}
{block name="content"}
    <div class="layui-form" lay-filter="layuiadmin-form-admin" id="layuiadmin-form-admin" style="padding: 20px 30px 0 0;">
        <div id="tree"></div>
        <div class="layui-form-item layui-hide">
            <input type="button" lay-submit lay-filter="submit" id="submit" value="确认">
        </div>
    </div>
{/block}
{block name="js"}
    <script>
        layui.use(['index', 'tree'], function(){
            var tree = layui.tree
                ,layer = layui.layer;

            //基本演示
            tree.render({
                elem: '#tree'
                ,data: JSON.parse('{$permissions|raw}')
                ,showCheckbox: true  //是否显示复选框
                ,id: 'tree_id'
                ,isJump: true //是否允许点击节点时弹出新窗口跳转
                ,click: function(obj){
                    //var data = obj.data;  //获取当前点击的节点数据
                    //layer.msg('状态：'+ obj.state + '<br>节点数据：' + JSON.stringify(data));
                }
            });
        });
    </script>
{/block}
